package com.example.mysdktest.fanxin;

import android.app.Activity;

import org.junit.Test;

/**
 * Created by baichuan on 2016/11/18.
 */

public class Demo01 {

    @Test
    public void test01() {
        Ant<String> ant = new Ant<String>();
        System.out.println(ant.get("ant"));
    }

}


// 泛型类
class Ant<E> {

    public E get(E ant) {

        return ant;
    }


}


class test02 {

    public static <T extends Activity> T get(T ant) {

        return ant;
    }
}

interface myFace<T> {

    public void add(T obj);

    public T get(int id);
}

class UserModel {
    private int id;
    private String name;

}


class myFaceImple implements myFace<UserModel> {


    @Override
    public void add(UserModel obj) {

    }

    @Override
    public UserModel get(int id) {
        return null;
    }
}
